import request from '@/utils/request'

export function GetGroups() {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/GetGroups',
    method: 'get',
  })
}
export function GetMyGroups() {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/GetMyGroups',
    method: 'get',
  })
}
export function AddGroup(data) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/AddGroup',
    method: 'post',
    data
  })
}
export function ModifyGroup(data) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/ModifyGroup',
    method: 'post',
    data
  })
}
export function GetMyManage(pageIndex, pageSize, status, from, to, grpId = -1, query = '') {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/GetMyManage',
    method: 'get',
    params: {
      pageIndex, pageSize, status, from, to, grpId, query
    }
  })
}
export function GetMyPublish(pageIndex, pageSize, status, from, to, grpId = -1, query = '') {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/GetMyPublish',
    method: 'get',
    params: {
      pageIndex, pageSize, status, from, to, grpId, query
    }
  })
}
export function GetMyPrincipal(pageIndex, pageSize, status, from, to, grpId = -1, query = '') {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/GetMyPrincipal',
    method: 'get',
    params: {
      pageIndex, pageSize, status, from, to, grpId, query
    }
  })
}
export function GetMyHandle(pageIndex, pageSize, status, from, to, grpId = -1, query = '') {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/GetMyHandle',
    method: 'get',
    params: {
      pageIndex, pageSize, status, from, to, grpId, query
    }
  })
}
export function GetTask(taskId) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/GetTask',
    method: 'get',
    params: {
      taskId
    }
  })
}
export function AddTasks(data) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/AddTasks',
    method: 'post',
    data
  })
}
export function ModifyTask(data) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/ModifyTask',
    method: 'post',
    data
  })
}
export function ConfirmTask(data) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/ConfirmTask',
    method: 'post',
    data
  })
}
export function SubmitTask(data) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/SubmitTask',
    method: 'post',
    data
  })
}
export function RejectTask(data) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/RejectTask',
    method: 'post',
    data
  })
}
export function CancleTask(data) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/CancleTask',
    method: 'post',
    data
  })
}
export function CheckPass(data) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/CheckPassTask',
    method: 'post',
    data
  })
}
export function AddComment(data) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/AddComment',
    method: 'post',
    data
  })
}
export function GetGroupUsers(workGrpId) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/GetGroupUsers',
    method: 'get',
    params: {
      workGrpId
    }
  })
}
export function GetAllUsers() {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/GetAllUsers',
    method: 'get',
    params: {

    }
  })
}
export function AddGroupUser(data) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/AddGroupUser',
    method: 'post',
    data
  })
}
export function RemoveGroupUser(data) {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/RemoveGroupUser',
    method: 'post',
    data
  })
}
export function GetStatistic() {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/GetStatistic',
    method: 'get'
  })
}
export function GetRoles() {
  return request({
    url: '/api/WorkTask/WorkTaskManageApi/GetRoles',
    method: 'get'
  })
}